using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class webadmin_pages_khoadaotao_list : System.Web.UI.Page
{
    public Common _common;
    public DataTable catdtt;
    public DataTable catsubdtt;
    public DataTable newsddt = new DataTable();
    private void LoadKDT()
    {
        string sql = "select *, convert(varchar, A.ngay_tao, 103) as ngaytao from DaoTao_khoa_dao_tao as A inner join DanhMuc_nganh_kinh_doanh as B on A.ma_nganh_dt = B.ma_nganh_kd inner join DaoTao_trinh_do_dao_tao as C on A.ma_trinh_do_dt = C.ma_trinh_do_dt inner join DaoTao_hinh_thuc_dao_tao as D on A.ma_hinh_thuc_dt = D.ma_hinh_thuc_dt where A.ma_co_so_dt = '" + this.Session["ma_co_so"].ToString() + "'";
        DataSet set = this._common.ExeceuteDataset(sql);
        this.rpt_kdt.DataSource = set;
        this.rpt_kdt.DataBind();
        this.lbl_total.Text = set.Tables[0].Rows.Count.ToString();
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        this._common = new Common();
        if ((!string.IsNullOrEmpty(base.Request.Params["id"]) && !string.IsNullOrEmpty(base.Request.Params["act"])) && base.Request.Params["act"].ToString().Trim().Equals("del"))
        {
            string str = this._common.TextFormat(base.Request.Params["id"].ToString());
            this._common.execNoneQuery("delete DaoTao_khoa_dao_tao where ma_khoa_dt = '" + str + "'");
        }
        if (!string.IsNullOrEmpty(base.Request.Params["ma"]))
        {
            this.Session["ma_co_so"] = base.Request.Params["ma"].ToString();
        }
        this.LoadKDT();
    }
}
